<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>pie</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Function</center>
    <div align="right">Last update : 30/11/2005</div>
    <p>
      <b>pie</b> - draw a pie</p>
    <h3>
      <font color="blue">Calling Sequence</font>
    </h3>
    <dl>
      <dd>
        <tt>pie(x)</tt>
      </dd>
      <dd>
        <tt>pie(x[,sp[,txt]])</tt>
      </dd>
    </dl>
    <h3>
      <font color="blue">Parameters</font>
    </h3>
    <ul>
      <li>
        <tt>
          <b>x</b>
        </tt>: a scalar or a vector of positive reals.</li>
      <li>
        <tt>
          <b>sp</b>
        </tt>: a real scalar or a vector of reals.</li>
      <li>
        <tt>
          <b>txt</b>
        </tt>: a cell or a vector of strings.</li>
    </ul>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>
      <tt>
        <b>pie(x):</b>
      </tt> if size of x is N then pie function draws a pie
		with N parts, the area of the ith part is equal to (x(i)/sum(x))*( surface
		of the unit cercle).</p>
    <p>
      <tt>
        <b>pie(x,sp):</b>
      </tt>the sp vector allows to cut one or several
		parts of the pie, (the size of sp must be equal to N). if the value of the
		ith index of sp is different of zero then the ith part is separated from
		the others by a space, else if it' s equal to zero then it is attached to
		the others.</p>
    <p>
      <tt>
        <b>pie(x,txt):</b>
      </tt> the txt vector allows to write a text for
		each part of the pie, the ith component of txt corresponds to the ith part
		(default : it's written the percentages which corresponds to the parts
		suface). The size of txt must be equal to N.</p>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>
// First example : one input argument  x=[1 2 5]
scf(0);
pie([1 2 5]);

// Second example : two input arguments x=[5 9  4 6 3], sp=[0 1 0 1 0], the second and the fourth are separated of the others
scf(1);
pie([5 9 4 6 3],[0 1 0 1 0]);

// Third example : three input arguments, x=[3 4 6 2], sp=[0 1 0 0], txt=["part1","part2","part3","part4"]
scf(2);
pie([3 4 6 2],[0 1 0 0],["part1","part2","part3","part4"]);
</pre>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="xfpolys.htm">
        <tt>
          <b>xfpolys</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
    <h3>
      <font color="blue">Author</font>
    </h3>
    <p>Farid Belahcene</p>
  </body>
</html>
